/*
 * Powered By ljc
 * Since 2013 - 2013
 */

package com.ljc.app.service;

import com.ljc.app.dao.UserDao;
import com.ljc.app.model.User;
import com.ljc.app.query.UserQuery;
import common.base.BaseManager;
import common.base.EntityDao;
import common.util.page.PageList;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Liu_jc
 * @since 1.0
 */

@SuppressWarnings(value = "all")
@Service
@Transactional
public class UserManager extends BaseManager<User,Integer>{

	private UserDao userDao;
	//增加setXXXX()方法,spring就可以通过autowire自动设置对象属性(默认byName,请注意大小写)
	public void setUserDao(UserDao dao) {
		this.userDao = dao;
	}
	public EntityDao getEntityDao() {
		return this.userDao;
	}
	
	@Transactional(readOnly=true)
	public PageList<User> findPage(UserQuery query) {
		return userDao.findPage(query);
	}
	
}
